// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0

struct KeySlot { width-u: float, spacer: bool, background: color, font-size: length, }
struct Row { key-slots: [KeySlot], }
struct Layer { default-key-width-u: float, total-width-u: float, rows: [Row] }



export component TestCase  {
    // issue #3574
    out property<[Layer]> layers: [ {
           default-key-width-u: 1.0,
           total-width-u: 10.0,
           rows: [
               { key-slots: [ { width-u: 0.5}, { spacer: true, width-u: 0.5}, ] },
               { key-slots: [ { width-u: 2.5, background: #bbbbbb }, ] }
           ],
       } ];

    property <[[{a: string, b: string, c: string}]]> array : [
        [{a: "hello"}],
        [],
        [{a: "world"}, {a: "extra", b: "ok"} ],
    ];
    out property <bool> test: array[2][1].b == "ok" && layers[0].rows[0].key-slots[1].spacer;
}



/*

```cpp
auto handle = TestCase::create();
const TestCase &instance = *handle;
assert(instance.get_test());
```


```rust
let instance = TestCase::new().unwrap();
assert!(instance.get_test());
```

```js
var instance = new slint.TestCase({});
assert(instance.test);
```

*/
